import Mock from 'mockjs';


export default {
    className: "system.model.User",
    queryData: function(postData) {
        return Mock.mock({
            isSuccess: "Y",
            reason: "",
            message: [],
            "data": {
                "recordCount": 38,
                "pageCount": 1,
                "pageIndex": 1,
                "pageSize": 20,
                "queryResult|38": [{
                    "keyID|1000-9999": 1000,
                    "loginName": /^[a-z][a-z][a-z][a-z][a-z]$/,
                    "name": Mock.mock('@ctitle'),
                    "pwd":/^[1][1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$/,
                    "role": Mock.mock('@ctitle'),
                    "SpecialAreaPowers": "芒果",
                    "email": Mock.mock('@email'),
                    "phone": /^[1][1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$/,
                    "creationBy": "admin",
                    "createTime": Mock.mock('@now'),
                    "lastLoginDate": Mock.mock('@now'),
                    "lastUpdatedBy": "admin",
                    "lastUpdateTime": Mock.mock('@now'),
                    "version": 1,
                    "isEnabled": "有效",
                    "isEnabledVal": "Available"
                }]
            }
        });
    },
    queryByKeyID: function(postData) {
        return Mock.mock({
            isSuccess: "Y",
            reason: "",
            message: [],
            "data": {
                "keyID|1000-9999": 1000,
                "loginName": /^[a-z][a-z][a-z][a-z][a-z]$/,
                "name": Mock.mock('@ctitle'),
                "pwd":/^[1][1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$/,
                "role": Mock.mock('@ctitle'),
                "groupName": /^[A-Z][a-z][a-z][a-z][a-z][A-Z][a-z][a-z][a-z][a-z]$/,
                "email": Mock.mock('@email'),
                "phone": "18327168171",
                "creationBy": "admin",
                "groupID": "C",
                "createTime": Mock.mock('@now'),
                "lastLoginDate": Mock.mock('@now'),
                "lastUpdatedBy": "admin",
                "lastUpdateTime": Mock.mock('@now'),
                "version": 1,
                "isEnabled": "有效",
                "isEnabledVal": "Available"
            }
        });
    },
};
